package com.chy.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.chy.common.R;
import com.chy.entity.Article;
import com.chy.entity.ArticleManagerItem;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.HashMap;
import java.util.Map;

@Mapper
public interface ArticleMapper extends BaseMapper<Article> {
    @MapKey("id")
    IPage<ArticleManagerItem> selectMyPage(IPage<Article> pageInfo, @Param(Constants.WRAPPER) Wrapper<Article> wrapper);


    Object getArtById(@Param(value = "id") Long id);

    Boolean updateArticle(@Param(value = "params") Map<String, Object> params);
}
